import type { BookType, Nationality } from './constant';

export interface ResponseData<T = any> {
  code: number;
  flag: boolean;
  msg: string;
  result: T;
  data: T;
}
export interface ResultData<T = any> {
  code: string;
  msg: string;
  data: T;
  error: string;
}

export interface PageDto {
  pageNumber: number;
  pageSize: number;
  key: string;
  typeCode: string;
}

export interface userInfo {
  id: string;
  avatar: string;
  intro: string;
  nickName: string;
  phone: number;
  password: string;
  status: number;
  updateTime: number;
  createTime: number;
  province: string;
  city: string;
  number: string;
  checkNickName: string;
  checkIntro: string;
  checkAvatar: string;
  checkStatus: number;
}

export interface addressInfo {
  id: string;
  address: string;
  createTime: number;
  name: string;
  phone: string;
  userId: string;
  updateTime: number;
}

export interface ProductInfo {
  imgUrl: string;
  buyMoneyAll: number;
  productPrice: number;
  productImg: string[];
  productTitle: string;
  productId?: string;
  nickName: string;
  id: string;
  title: string;
  intro: string;
  image: string[];
  price: number;
  originalPrice: number;
  postType: number;
  adcode: string;
  province: string;
  city: string;
  district: string;
  status: number;
  userId: string;
  createTime: number;
  avatar: string;
  likeCount: number;
  updateTime: number;
}
export interface avatarResponseData {
  flag: boolean;
  msg?: string;
  data?: string; // 根据实际情况调整 data 的类型
}

export interface Menu {
  id:string;
  crteateTime: number;
  updateTime: number;
  typeCode: string;
  typeName: string;
}
export interface User {
  id: string;
  avatar: string;
  intro: string;
  nickName: string;
  phone: number;
  password: string;
  status: number;
  updateTime: number;
  createTime: number;
  province: string;
  city: string;
  number: string;
  checkNickName: string;
  checkIntro: string;
  checkAvatar: string;
  checkStatus: number;
}

export interface login {
  phone: string;
  password: string;
  province: string;
  code: string;
  city: string;
}
export interface register {
  code: string;
  username: string;
  password: string;
  confirmPass: string;
  email: string;
}
